if exists("b:did_perl_maps")
	finish
endif
let b:did_perl_maps = 1

set iskeyword+=:

set complete+=k~/.vim/extras/autocomplete.perl

nmap gx yiw/^sub\s\+<C-R>"<CR>
nmap <F2>   :! %<CR>
nmap <F3>   :! perldoc %<CR>
nmap <F4>   :w<CR>:! perltidy -b %<CR>:e!<CR>
nmap <F5>   :w<CR>:! perltidy -b -pro=/home/apressel/.integralink.perltidyrc %<CR>:e!<CR>
nmap <F9>   :! dprofpp -u -p %<CR>

nmap <F10> 0o######## DEV-ONLY ########<ESC>o


" put the cursor over a perl function and try backslash-pf to see perldoc
nmap <Leader>pf :!perldoc -f <cword><CR>

" put the cursor over a perl module name and try backslash-pd to see perldoc
nmap <Leader>pd :!perldoc <cword><CR>

" put the cursor over a perl module name and try backslash-pd to see perldoc
nmap <Leader>pm :!perldoc -m <cword><CR>

"let perl_fold = 1
"let perl_nofold_packages = 1
